from sanic import exceptions

class CheckTriggerError(exceptions.ServerError):
    description = "检"


class ApplicationError(exceptions.ServerError):
    description = "通用错误处理"


class TokenError(ApplicationError):
    description = "token异常"


class TokenEXPIRError(TokenError):
    description = "登录过期"


class GraphBaseError(ApplicationError):
    description = "试图运行正在运行的graph"


class GraphNotFundError(ApplicationError):
    description = "图(graph)对象不存在"


class GraphRunError(ApplicationError):
    description = "试图运行正在运行的graph"


class GrapEvaluateRunError(ApplicationError):
    description = "创建评估检查未通过"


class ModuleBaseError(ApplicationError):
    description = "组件相关错误"


class NodeBaseError(ApplicationError):
    description = "节点相关错误"


class EdgeBaseError(ApplicationError):
    description = "边相关错误"


class EdgeNotFoundError(EdgeBaseError):
    description = "节点对象不存在"


class UserBaseError(ApplicationError):
    description = "用户相关错误"


class ThirdLoginError(exceptions.InvalidUsage):
    description = "三方登录参数错误"


class RequestParamsError(ApplicationError):
    description = "请求传参错误"
